package day03;

import java.util.Scanner;

/**
 * @author wangzhisen
 * @Desc TODO
 * @date 2025/4/10
 */

//1 1 2 3 5 8 13 21 34 55 ...

public class Test5 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n;
        System.out.println("请输入数字个数：");
        n= sc.nextInt();
        if(n<=0){
            return;
        }
        int a=1,b=1;
        System.out.print(a+" ");
        if(n>=2){
            System.out.print(b+" ");
        }
        for(int i=3; i<=n;i++){
            int c=a+b;
            System.out.print(c+" ");
            a=b;
            b=c;
        }
    }
}
